-
Notifications
You must be signed in to change notification settings - Fork 204
fix(#572, #575): ensure icon overrides apply after refresh #576
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(#572, #575): ensure icon overrides apply after refresh #576
Conversation
@@ -132,6 +132,7 @@ return { | |||
["odin"] = "odin", | |||
["openscad"] = "scad", | |||
["opus"] = "opus", | |||
["org"] = "org", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you.
function M.setup(opts) | ||
if loaded then | ||
local function apply_user_icons() | ||
if type(user_icons) ~= "table" then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the safest course of action, it maintains existing behaviour.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks for the quick fix.
Resolves #572 (original issue)
Resolves #575 (reported bug)
What I did
I reapplied the changes from #572.
In addition, I fixed the reported bug with 37078ee.
How to reproduce the bug
I configured locally the plugin so I simulate I "require" the plugin from other plugin as dependency, but without calling "setup".
With this, when I open NeoVim I got exactly the same error reported by the user:
Explanation
Because
setup
was not called,user_icons
was not initialized properly. As result, callingapply_user_icons
from the auto command was 🧨 .